package com.xiaoc.bulldozer.common;

public enum ResponseCode {

    ADD_LIKE_ERROR(201, "点赞异常"),
    VERIFY_CODE_ERROR(203, "验证码错误或已经过期"),
    FAIL(202, "fail"),RECEIVE(204, "已领取红包"),SLIP(205, "悄悄溜走了"),

    ADD_LIKE_FAIL_ERROR(206, "点赞失败"),
    // HTTP错误
    REQUEST_FORBIDDEN(403, "非法请求"), REQUEST_TIMEOUT(405, "登录超时"),

    // 6xx表示请求参数错误
    REQUEST_ERROR(600, "请求错误"), REQUEST_ERROR_TOO_FREQUENT(601, "请求太频繁"), REQUEST_ERROR_USER_LOCKED(602, "用户被锁定"),

    // 7xx表示请求参数错误
    PARAM_ERROR(700, "请求参数错误"), PARAM_ERROR_CAN_NOT_NULL(701, "必填参数不能为空"), PARAM_ERROR_MSG_CODE(702, "验证码错误"), PARAM_ERROR_ACTIVE_CODE(703, "激活码错误"),

    UNIFINATE_ERROR(704, "统一处理错误码"),

    // 8xx表示服务器业务逻辑错误
    BUSINESS_ERROR(800, "系统异常"),

    ALREADY_APPOINTMENT_ERROR(801, "已经预约过"),


    APPOINTMENT_ERROR(802, "预约失败"),

    REGISTER_SUCCESS_APPOINTMENT_ERROR(803, "注册成功，预约失败"),

    // 9xx表示抛异常
    EXCEPTION(900, "发生异常"), EXCEPTION_SEND_MSG_CODE(901, "发送验证码异常"),

    WEIXIN_CODE2SESSION_ERROR(40000, "获取用户信息失败"), WEIXIN_USER_NOTEXIST(40100, "用户不存在"), WEIXIN_USER_TIMEOUT(40200, "用户已过期, 请重新登录"),
    
    // 10xx表示核验异常
    VERIFY_SUCCESS(1000, "手机号已被注册"), REQUESTBODY_ERROR(1001, "参数值为空"), IDENTITY_ERROR(1002, ""), PHONE_ERROR(1003, "手机号格式有误"),
    VERIFY_FAIL(1004, "您已注册过，请勿重复注册"), CACHE_EXPIRE(1005, "缓存已过期"), CACHE_NULL(1006, "数据未缓存"),

    // 11xx表示上传照片异常
    PHOTO_EMPTY_ERROR(1100, "上传文件不能为空"),PHOTO_NO_ROLE_ERROR(1101, "没有上传照片的权限"),PHOTO_FORMAT_ERROR(1102, "图片格式错误"),

    //12xx 表示Pay异常
    PAY_PARAM_ERROR(1200, "请求参数错误"),PAY_USER_NOT_EXIST(1201, "用户不存在"),PAY_REQUEST_TIMEOUT(1202, "请求过期"),PAY_BALANCE_ERROR(1203, "提现金额必须为3的整数倍"),
    PAY_TOKEN_ERROR(1204, "无效token"),


    AD_NULL(1300,"请求的广告位为空"), NOT_SHARE(1301,"分享未开启"),

    //14XX 分销商异常
    CANNOT_OPEN_AWARD_DESC(1401,"要请武汉移动用户注册可提高参与率")
    ;







    private int code;

    private String msg;

    private ResponseCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

}
